package com.student.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CertificateType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Certificate_Type", schema = "dbo", catalog = "StudentManager")
public class CertificateType implements java.io.Serializable {

	// Fields

	private Long certificateTypeId;
	private String certificateTypeName;
	private Set<CertificateAssciation> certificateAssciations = new HashSet<CertificateAssciation>(
			0);

	// Constructors

	/** default constructor */
	public CertificateType() {
	}

	/** minimal constructor */
	public CertificateType(Long certificateTypeId, String certificateTypeName) {
		this.certificateTypeId = certificateTypeId;
		this.certificateTypeName = certificateTypeName;
	}

	/** full constructor */
	public CertificateType(Long certificateTypeId, String certificateTypeName,
			Set<CertificateAssciation> certificateAssciations) {
		this.certificateTypeId = certificateTypeId;
		this.certificateTypeName = certificateTypeName;
		this.certificateAssciations = certificateAssciations;
	}

	// Property accessors
	@Id
	@Column(name = "Certificate_Type_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getCertificateTypeId() {
		return this.certificateTypeId;
	}

	public void setCertificateTypeId(Long certificateTypeId) {
		this.certificateTypeId = certificateTypeId;
	}

	@Column(name = "Certificate_Type_Name", nullable = false, length = 128)
	public String getCertificateTypeName() {
		return this.certificateTypeName;
	}

	public void setCertificateTypeName(String certificateTypeName) {
		this.certificateTypeName = certificateTypeName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "certificateType")
	public Set<CertificateAssciation> getCertificateAssciations() {
		return this.certificateAssciations;
	}

	public void setCertificateAssciations(
			Set<CertificateAssciation> certificateAssciations) {
		this.certificateAssciations = certificateAssciations;
	}

}